package com.logisticsrepair.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.logisticsrepair.enums.RepairStatusEnum;
import lombok.Data;

/**
 * 报修订单
 *
 * @TableName repair_orders
 */
@TableName(value = "repair_orders")
@Data
public class RepairOrdersEntity implements Serializable {
    /**
     * 订单编号
     */
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private String orderId;

    /**
     * 用户标识
     */
    @TableField(value = "user_openid")
    private String userOpenid;

    /**
     * 报修类型
     */
    @TableField(value = "type_mark")
    private Integer typeMark;

    /**
     * 报修地址
     */
    @TableField(value = "repair_address")
    private String repairAddress;

    /**
     * 报修内容
     */
    @TableField(value = "repair_content")
    private String repairContent;

    /**
     * 联系号码
     */
    @TableField(value = "repair_phone")
    private String repairPhone;

    /**
     * 报修日期
     */
    @TableField(value = "repair_date")
    private String repairDate;

    /**
     * 维修状态
     */
    @TableField(value = "status_code")
    private RepairStatusEnum statusCode;

    /**
     * 维修版本标识
     */
    @TableField(value = "repair_version")
    @Version
    private Integer repairVersion;

    /**
     * 报修完成日期
     */
    @TableField(value = "repair_complate_date")
    private Date repairComplateDate;

    /**
     * 维修员标识
     */
    @TableField(value = "worker_openid")
    private String workerOpenid;

    /**
     * 驳回原因
     */
    @TableField(value = "reject_reason")
    private String rejectReason;

    /**
     * 图片地址
     */
    @TableField(value = "img_url")
    private String imgUrl;

    @TableField(exist = false)
    private RepairStatusEntity repairStatusEntity;
    @TableField(exist = false)
    private RepairTypeEntity repairTypeEntity;
    @TableField(exist = false)
    private WorkerEntity workerEntity;
    @TableField(exist = false)
    private UserEntity userEntity;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
